package com.internetCafes.spms.web.certificate.model.vo.airecognize;

import com.internetCafes.spms.web.certificate.vo.AIRecognizeInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 识别成功证书信息
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RecognizeSuccessInfo extends AIRecognizeInfo {

    /**
     * 前端唯一字段
     */
    private Integer listId;

    /**
     * 保管部门id
     */
    private Long keepDeptId;

    /**
     * 保管人id
     */
    private Long keepUserId;

    /**
     * 证书类型 1在职员工,2挂靠，3非在职员工
     */
    private Integer certificateType;

    /**
     * 部门名称，提供给前端方便表单
     */
    private String deptName;

    /**
     * 保管人姓名，提供给前端方便表单
     */
    private String tackName;

    /**
     * 文件路径
     */
    private String fileUrl;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        RecognizeSuccessInfo that = (RecognizeSuccessInfo) o;
        if (this.getName() == null || this.getIdCard() == null || this.getCertificateNo() == null) {
            return false;
        }
        return (this.getName().equals(that.getName())
                && this.getIdCard().equals(that.getIdCard())
                && this.getCertificateNo().equals(that.getCertificateNo()));
    }
}

